{% extends 'blank.html.twig' %}
{% block body %}
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户管理 <span class="c-gray en">&gt;</span> 用户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
 <div class="page-container">
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
    <tr>
        {# sorting of properties based on query components #}
        <th>{{ knp_pagination_sortable(pagination, 'Id', 'a.id') }}</th>
        <th{% if pagination.isSorted('a.username') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '用户名', 'a.username') }}</th>
        <th>qq</th>
        <th>微信'</th>
        <th>手机</th>
        <th>{{ knp_pagination_sortable(pagination, '邮箱', 'a.email') }}</th>
        <th{% if pagination.isSorted('a.lastLoginDate') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '最后登录时间', 'a.lastLoginDate') }}</th>
        <th>最后登录ip</th>
        <th{% if pagination.isSorted('a.status') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '用户状态', 'a.status') }}</th>
        <th>操作</th>
    </tr>

    {# table body #}
    {% for item in pagination %}
        <tr class="{{ cycle(['success','warning'],item.id) }}">
            <td>{{ item.id }}</td>
            <td>{{ item.username }}</td>
            <th>{{ item.qq }}</th>
            <th>{{ item.weixin }}</th>
            <th>{{ item.telephone }}</th>
            <th>{{ item.email }}</th>
            <th>{{ item.lastLoginDate }}</th>
            <th>{{ item.lastLoginIp }}</th>
            {% if item.status == 1 %}
                <th>正常</th>
            {% elseif item.status == 0 %}
                <th>失效</th>
            {% elseif item.status == -1 %}
                <th>待审核</th>
            {% endif %}
            <th></th>
        </tr>
    {% endfor %}
</table>
{# display navigation #}
<div class="navigation">
    {{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
{% endblock %}